package com.base.mvp;


import com.face.gaoml.netlibrary.RxManager;

import net.MyApiService;

import java.lang.ref.WeakReference;

import javax.annotation.Nullable;
import javax.inject.Inject;


/**
 * MVPPlugin
 * 邮箱 784787081@qq.com
 */

public class BasePresenterImpl<V extends BaseView> implements BasePresenter<V> {

    public WeakReference<V> getMvpView() {
        return mvpView;
    }

    private WeakReference<V> mvpView;
    @Inject
    protected MyApiService apiStores;
    public RxManager mRxManager;


    @Override
    public void attachView(V view) {
        mvpView = new WeakReference<V>(view);
        mRxManager = new RxManager();
    }

    @Override
    public void detachView() {

        if (mvpView != null) {
            mvpView.clear();
            mvpView = null;
            mRxManager.clear();
        }
    }






}
